package com.samp.bblock.util;

import java.util.Random;

public class RandomUtils {

    private static Random random = new Random();

    /**
     * 返回指定区间的随机整数
     * @param min
     * @param max
     * @return
     */
    public static int getRandomInt(int min, int max){
        if( min >= max ){
            return 0;
        }
        return random.nextInt(max-min)+min;
    }

    public static void main(String[] args) {
        for( int i = 0 ; i< 10 ; i++){
            System.out.println(getRandomInt(3,8));
        }
    }
}
